/*
 * Copyright (C) 2012-2013 c-netrunner (http://code.google.com/p/c-netrunner)
 * 
 * This program is free software: you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as published 
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *   
 * This source code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.ridgelineapps.netrunner.core;

import java.util.ArrayList;

import com.ridgelineapps.netrunner.api.Card;
import com.ridgelineapps.netrunner.api.CardList;
import com.ridgelineapps.netrunner.api.PlayArea;

public class Utils {
   public static ArrayList<Card> getCorpRezzedRemoteServers(PlayArea playArea) {
      ArrayList<Card> cards = new ArrayList<Card>();
      for(CardList cardList : playArea.corpRemoteServers) {
         for(Card card : cardList.cards) {
            if(card.rezzed) {
               cards.add(card);
            }
         }
      }
      return cards;
   }

   public static ArrayList<Card> getRunnersRig(PlayArea playArea) {
      ArrayList<Card> cards = new ArrayList<Card>();
      for(Card card : playArea.runnerRigHardware.cards) {
         cards.add(card);
      }
      for(Card card : playArea.runnerRigPrograms.cards) {
         cards.add(card);
      }
      for(Card card : playArea.runnerRigResources.cards) {
         cards.add(card);
      }
      return cards;
   }
}
